import request from "@/utils/request";

class serviceInfoAPI {
  static getServiceInfo(queryParams: any) {
    return request<any, PageResult<any[]>>({
      url: "/api/v1/serviceinfo",
      method: "get",
      params: queryParams,
    });
  }

  static addServiceInfo(data: any) {
    return request({
      url: "/api/v1/serviceinfo",
      method: "post",
      data: data,
    });
  }

  static showServiceInfo(id: any) {
    return request({
      url: `/api/v1/serviceinfo/${id}/form`,
      method: "get",
    });
  }

  static editServiceInfo(data: any) {
    return request({
      url: "/api/v1/serviceinfo/" + data.id,
      method: "put",
      data: data,
    });
  }

  static deleteByIds(ids: string) {
    return request({
      url: "/api/v1/serviceinfo/" + ids,
      method: "delete",
    });
  }
}

export default serviceInfoAPI;
